package cn.tedu.spring.eg4;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class Shopcontroller {
    private  String status;
    public  Shopcontroller(){
        System.out.println("1.实例化阶段[无参方法]");
    }
    @Value("等你")
    public  void setStatus(String setst){
        this.status=setst;
        System.out.println("2.属性赋值阶段[set方法]");
    }
    @PostConstruct
    public  void init(){
        System.out.println("3.生命周期初始化阶段");
    }
    @PreDestroy
    public  void estroy(){
        System.out.println("5.生命周期销毁方法");
    }




}
